/*
*编写一个程序判断一个vector<int>类型的容器所包含的元素是否与一个list<int>类型的容器所包含的元素是否完全相同
*/
#include <iostream>
#include <vector>
#include <list>
using namespace std;


int main()
{
	list<int> ilist;
	ilist.push_back(3);
	ilist.push_back(42);
	ilist.push_back(21);
	ilist.push_back(23);
	ilist.push_back(44);

	vector<int> ivec;
	ivec.push_back(3);
	ivec.push_back(42);
	ivec.push_back(21);
	ivec.push_back(23);
	ivec.push_back(44);

	vector <int> ivec1;
	for(list<int>::iterator iter = ilist.begin();iter != ilist.end();iter++)
	{
		ivec1.push_back(*iter);
	}

	if(ivec == ivec1)
	{
		cout << "相等！";
	}
	else
	{
		cout << "不相等！";
	}
	
	cout << endl;
	system("pause");
	return 0;
}
